<div class="header">
	<div class="header_container">
		<div class="logo">

		</div>
		
		<div class="account">
			<?php
				use DengLuTong\DengLuTong;
				include_once 'DengluTong/DengluTong.php';
			
				if (! isset($_SESSION["normal_user"])) {
					$login_info = DengLuTong::getLoginInfo(); 
					foreach ($login_info as $info) {
						echo "<a href=\"javascript:winOpen('".$info['url']."', '900', '550')\" title='".$info['name']."'><img src='".$info['logo']."' /></a>";
						echo '&nbsp';
					}
				 } else {?>
					<div class="account_info">
						<p>
							Welcome, <a target="_blank" href="<?php  echo $_SESSION["normal_user"]->home_page; ?>">
				 			<?php echo $_SESSION["normal_user"]->name; ?></a>!
				 		</p>
				 		<p>
							<a href="<?php  echo $this->url(array('module'=>'user', 'controller'=>'index', 'action'=>'index'));?>">我的账户</a>&nbsp;/
							<a href="<?php  echo $this->url(array('controller'=>'index', 'action'=>'logout'));?>">退出</a>
						</p>
						<p>
							付费金币：<?php echo $_SESSION["normal_user"]->paid_token; ?>
				 			免费金币：<?php echo $_SESSION["normal_user"]->free_token; ?>
						</p>
					</div>
					<div class="account_image">
						<a href="<?php  echo $_SESSION["normal_user"]->home_page; ?>">
				 			<img src="<?php echo $_SESSION["normal_user"]->head; ?>" />
				 		</a>
					</div>
				<?php }?>
			
			<script>
			
			function winOpen(url,iWidth,iHeight)
			{
				var iTop = (screen.height-30-iHeight)/2; //获得窗口的垂直位置;
				var iLeft = (screen.width-10-iWidth)/2; //获得窗口的水平位置;
				//chrome不支持showModalDialog弹出模态窗口
				win=window.showModalDialog(url,null,"dialogWidth="+iWidth+"px;dialogHeight="+iHeight+"px;dialogTop="+iTop+"px;dialogLeft="+iLeft+"px");
			}
			
			</script>
		</div>
	</div>
</div>